import React, { Component } from 'react';
import './App.less';  // 引入样式文件
import {BrowserRouter, Route, Routes, Navigate } from "react-router-dom";
import Home from './view/Home.jsx';
import Config from './view/Config.jsx';
import Draw from './view/Draw.jsx';

class App extends Component {
    constructor(props) {
        super(props);
        this.state = {
            ss:'subtest2'
        };
    }

    render() {
        return (
            <BrowserRouter>
                <Routes>
                    <Route path="/home" exact element={<Home />}/>
                    <Route path="/config" exact element={<Config />}/>
                    <Route path="/draw/:id" exact element={<Draw />}/>
                    <Route path="*" element={<Navigate to="/home" />} />
                </Routes>
            </BrowserRouter>
        );
    }
}
export default App;